﻿@model PageMeta
@{
    ViewBag.Title = Model != null ? Model.Title : "联系我们";
}

@section header{
    @if (Model != null)
    {
        <meta name="keywords" content="@Model.Keyword" />
        <meta name="description" content="@Model.Description" />
    }
}

<div class="banner" id="map_canvas" style="height:400px;">
</div>

<main class="container page-contact">


        <div class="row">
            <div class="col-xs-4">
                <h3 class="title_3">@SettingsManager.Contact.CompanyName</h3>
                <address>@SettingsManager.Contact.Address</address>
                <ul class="unstyle">
                    <li><i class="iconfont icon-man"></i> @SettingsManager.Contact.ContactMan</li>
                    <li><i class="iconfont icon-mobile"></i> @SettingsManager.Contact.Mobile</li>
                    <li><i class="iconfont icon-phone"></i> @SettingsManager.Contact.Phone</li>
                    <li><i class="iconfont icon-fax"></i> @SettingsManager.Contact.Fax</li>
                    <li><i class="iconfont icon-email"></i> @SettingsManager.Contact.MailTo</li>
                </ul>
            </div>
            <div class="col-xs-4">
                <div class="weixin">
                    <img src="@SettingsManager.Social.WeiXingCode" alt="官方微信" />
                    <p>关注官方微信</p>
                </div>
            </div>
        </div>


</main>



@section footer{
    <script language="javascript" src="http://api.map.baidu.com/api?v=2.0&ak=G7h0sKsr60IFU3OrHRmKTRzD"></script>
<script language="javascript">



        // 百度地图API功能
        var map = new BMap.Map("map_canvas");
        //坐标
        var vPoint = "@SettingsManager.Contact.Coordinate";
        var points = vPoint.split(',');



        map.addControl(new BMap.NavigationControl());
        map.enableScrollWheelZoom();    //启用滚轮放大缩小，默认禁用
        map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用

        map.centerAndZoom(new BMap.Point(points[0], points[1]), 14);
        var point = new BMap.Point(points[0], points[1]);


       // var myIcon = new BMap.Icon("/Content/Public/img/marker.png", new BMap.Size(132, 132));
       // var marker1 = new BMap.Marker(point, { icon: myIcon });  // 创建标注
         var marker1 = new BMap.Marker(point);

        map.addOverlay(marker1);              // 将标注添加到地图中
        // marker1.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
        var sContent =
            "<h3>@SettingsManager.Contact.CompanyName</h3>" +
            "<p>地址：@SettingsManager.Contact.Address <br/>" +
            "电话：@SettingsManager.Contact.Phone</p>" +
            "</div>";


        //创建信息窗口
        var infoWindow1 = new BMap.InfoWindow(sContent);
        marker1.addEventListener("click", function () { this.openInfoWindow(infoWindow1); });

        // marker1.openInfoWindow(infoWindow1);
       //  changeMapStyle('grayscale')
        //  sel.value = 'grayscale';

        function changeMapStyle(style) {
            map.setMapStyle({ style: style });
            //$('#desc').html(mapstyles[style].desc);
        }



</script>


    }